/**
 * 创建案件登记表
 * @param callback
 */
function createCaseBasicInfo(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_BASICINFO(" +
			            "CASE_BASICINFO_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "BILL_ID VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255),"+
			            "CASE_NUMBER VARCHAR(255),"+
			            "CASE_SOURCE VARCHAR(255),"+
			            "CASE_STEP VARCHAR(255) DEFAULT '信息登记',"+
			            "NEXT_CASE_STEP VARCHAR(255),"+
			            "REQUIRED VARCHAR(10) NOT NULL,"+ //必要环节；0否、1是
			            "CCERT_ID VARCHAR(20),"+
			            "CERTIFICATE_ID_1 VARCHAR(20),"+
			            "CERTIFICATE_ID_2 VARCHAR(20),"+
			            "CLWGJYCS BIGINT(11)," +
			            "CYRYWGJYCS BIGINT(11)," +
			            "EXECUTION_TYPE VARCHAR(20),"+
			            "FILLING_DATE DATETIME," +
			            "FILLING_PLACE VARCHAR(255),"+
			            "ILLEGAL_FACTS VARCHAR(255),"+
			            "ILLEGAL_LAW VARCHAR(255),"+
			            "ILLEGAL_TYPE_CODE VARCHAR(255),"+
			            "CASECAUSEID VARCHAR(255),"+
			            "CASECAUSENUMBER VARCHAR(255),"+
			            "DISCRETIONID VARCHAR(255),"+
			            "JYLB VARCHAR(255),"+
			            "ORGAN_ADDRESS VARCHAR(255),"+
			            "ORGAN_CONTACTOR VARCHAR(255),"+
			            "ORGAN_NAME VARCHAR(255),"+
			            "ORGAN_TEL VARCHAR(255),"+
			            "ORGAN_ZIPCODE VARCHAR(255),"+
			            "PARTY VARCHAR(255),"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_AGE VARCHAR(255),"+
			            "PARTY_ECERTID VARCHAR(255),"+
			            "PARTY_ID_NO VARCHAR(255)  NOT NULL,"+
			            "PARTY_MANAGER VARCHAR(255),"+
			            "PARTY_SEX VARCHAR(255),"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_TYPE VARCHAR(255),"+
			            "PARTY_UNIT_POSITION VARCHAR(255),"+
			            "PARTY_ZIPCODE VARCHAR(255),"+
			            "PUNISH_AMOUNT VARCHAR(255),"+
			            "PUNISH_LAW VARCHAR(255),"+
			            "REG_SYSTEM VARCHAR(255),"+
			            "SERIOUS_LEVEL VARCHAR(255),"+
			            "SHIP_CHECK_TON BIGINT(20)," +
			            "SHIP_NAME VARCHAR(255),"+
			            "STAFF_1 VARCHAR(255),"+
			            "STAFF_2 VARCHAR(255),"+
			            "STEP_TIME VARCHAR(20)," +
			            "VEHICLE_AXLES_NUMBER BIGINT(11),"+
			            "VEHICLE_CHECK_TON BIGINT(20),"+
			            "VEHICLE_GOODS_NAME VARCHAR(255),"+
			            "VEHICLE_ID_COLOR VARCHAR(255),"+
			            "VEHICLE_SHIP_ID VARCHAR(255),"+
			            "VEHICLE_SHIP_TYPE VARCHAR(255),"+
			            "VEHICLE_TOTAL_WEIGHT BIGINT(20),"+
			            "VEHICLE_LENGTH VARCHAR(255),"+
			            "VEHICLE_WIDTH VARCHAR(255),"+
			            "VEHICLE_HEIGHT VARCHAR(255),"+
			            "VEHICLE_REGISTER VARCHAR(255),"+
			            "ZFML VARCHAR(255),"+
			            "ZFMLID VARCHAR(255),"+
			            "ZIPAREA VARCHAR(255),"+
			            "DEPART_ID VARCHAR(100),"+
			            "DEPART_NAME VARCHAR(255),"+
			            "ORGAN_ID VARCHAR(100),"+
			            "CASE_TYPE VARCHAR(100),"+
			            "PUNISH_TPYE VARCHAR(100),"+
			            "ISONLINE VARCHAR(100) DEFAULT '离线'"+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建案件登记表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建案件登记处理表
 * @param callback
 */
function createCaseBasicInfoCl(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_BASICINFOCL(" +
			            "CASE_BASICINFOCL_ID INTEGER primary key AutoIncrement," +
			            "CASE_BASICINFO_ID INTEGER NOT NULL," +     //案件ID
			            "FILLING_DATE VARCHAR(20)," +              //立案时间
			            "CASE_NAME VARCHAR(255) NOT NULL,"+        //案由
			            "CASE_NUMBER VARCHAR(255) NOT NULL,"+      //案件编号
			            "CASE_STEP VARCHAR(255) NOT NULL DEFAULT '信息登记',"+ //案件环节
			            "NEXT_CASE_STEP VARCHAR(255) NOT NULL,"+ //案件环节
			            "REQUIRED VARCHAR(10) NOT NULL,"+ //必要环节；0否、1是
			            "CREATE_ID VARCHAR(100) NOT NULL," +         //创建人ID
			            "CREATE_NAME varchar(255) NOT NULL," +     //创建人姓名
			            "CREATE_TIME DATETIME  NOT NULL," +      //创建时间
			            "STAFF_1 VARCHAR(255) NOT NULL,"+          //执法人员1
			            "STAFF_2 VARCHAR(255) NOT NULL,"+          //执法人员2
			            "ISONLINE VARCHAR(100) DEFAULT '离线'"+     //在线、离线状态
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建案件登记处理表失败'+error.message); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_ADMINENFORCEAPPLICATION
 */
function createAdminEnforceApplication(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_ADMINENFORCEAPPLICATION(" +
			            "CASE_ADMINENFORCEAPPLICATION_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ATTACHMENT_FILES VARCHAR(255),"+
			            "BASIC_INFO VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "COURT VARCHAR(255),"+
			            "FILENO VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ," +
			            "ORGAN_CONTACTOR VARCHAR(255),"+
			            "ORGAN_TEL VARCHAR(20),"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PUNISH_DAY VARCHAR(20) NOT NULL ,"+
			            "PUNISH_DECISION VARCHAR(255),"+
			            "PUNISH_DECISION_CAPITAL VARCHAR(255) NOT NULL ,"+
			            "PUNISH_MONTH VARCHAR(20) NOT NULL ,"+
			            "PUNISH_YEAR VARCHAR(20) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建行政强制执行申请书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_ASSISTINVEST
 */
function createAssistInvest(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_ASSISTINVEST(" +
			            "CASE_ASSISTINVEST_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ASSIST_UNIT VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "CONTACTOR VARCHAR(255),"+
			            "INVEST_TIME DATETIME NOT NULL ,"+
			            "MADE_DATE DATETIME NOT NULL ,"+
			            "TEL VARCHAR(20),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建协助调查通知书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_AVOIDAPPLY
 */
function createAvoidApply(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_AVOIDAPPLY(" +
			            "CASE_AVOIDAPPLY_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "APPLY_REASON VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "ORGAN_NAME VARCHAR(255),"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_TEL VARCHAR(255),"+
			            "RESPONDENT VARCHAR(255) NOT NULL ,"+
			            "RESPONDENT_UNIT_POSITION VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建回避申请书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_AVOIDAPPLYAGREE
 */
function createAvoidApplyAgree(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_AVOIDAPPLYAGREE(" +
			            "CASE_AVOIDAPPLYAGREE_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "APPLY_DAY VARCHAR(20) NOT NULL ,"+
			            "APPLY_MONTH VARCHAR(20) NOT NULL ,"+
			            "APPLY_REASON VARCHAR(255) NOT NULL ,"+
			            "APPLY_YEAR VARCHAR(20) NOT NULL ,"+
			            "ARTICLE VARCHAR(20) NOT NULL ,"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "CLAUSE VARCHAR(20) NOT NULL ,"+
			            "ITEM VARCHAR(20) NOT NULL ,"+
			            "LAW_NAME VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_TEL VARCHAR(20),"+
			            "RESPONDENT VARCHAR(255) NOT NULL ,"+
			            "RESPONDENT_UNIT_POSITION VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建同意回避申请书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_AVOIDAPPLYREJECT
 */
function createAvoidApplyReject(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_AVOIDAPPLYREJECT(" +
			            "CASE_AVOIDAPPLYREJECT_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "APPLY_DAY VARCHAR(20) NOT NULL ,"+
			            "APPLY_MONTH VARCHAR(20) NOT NULL ,"+
			            "APPLY_REASON VARCHAR(255) NOT NULL ,"+
			            "APPLY_YEAR VARCHAR(20) NOT NULL ,"+
			            "ARTICLE VARCHAR(20) NOT NULL ,"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "CLAUSE VARCHAR(20) NOT NULL ,"+
			            "ITEM VARCHAR(20) NOT NULL ,"+
			            "LAW_NAME VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "RESPONDENT VARCHAR(255) NOT NULL ,"+
			            "RESPONDENT_UNIT_POSITION VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建驳回回避申请书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_CASEPROCESSIDEA
 */
function createCaseProcessIdea(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_CASEPROCESSIDEA(" +
			            "CASE_CASEPROCESSIDEA_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "AUDIT_OPINION VARCHAR(255) NOT NULL ,"+
			            "AUDIT_SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "CASE_INVESTIGATORS VARCHAR(255) NOT NULL ,"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "CASE_PROCESS_ILLEGAL_FACTS VARCHAR(255),"+
			            "INVEST_RESULT_PROCESS_IDEA VARCHAR(255) NOT NULL ,"+
			            "LAW_ORGAN_OPINION VARCHAR(255) NOT NULL ,"+
			            "LAW_ORGAN_SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_AGE BIGINT(20) NOT NULL ,"+
			            "PARTY_ID_NO VARCHAR(20),"+
			            "PARTY_JOB VARCHAR(255),"+
			            "PARTY_MANAGER VARCHAR(255),"+
			            "PARTY_SEX VARCHAR(255) NOT NULL ,"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_TYPE VARCHAR(255),"+
			            "STAFF_SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建取案件处理意见书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_CASEPROCESSIDEA
 */
function createCaseProcessIdeaDetail(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_CASEPROCESSIDEA_DETAIL(" +
			            "CASE_CASEPROCESSIDEA_DETAIL_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "AMOUNT BIGINT(11),"+
			            "EVIDENCE_NO VARCHAR(255) NOT NULL ,"+
			            "ITEM_NAME VARCHAR(255),"+
			            "SPEC_MODEL VARCHAR(255),"+
			            "CASE_CASEPROCESSIDEA_ID INTEGER(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建案件处理意见书明细表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_DELAYPAYFINEAPPLY
 */
function createDelayPayfineApply(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_DELAYPAYFINEAPPLY(" +
			            "CASE_DELAYPAYFINEAPPLY_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "FILENO VARCHAR(255),"+
			            "ILLEGAL_FACTS_PUNISH_DECISION VARCHAR(255) NOT NULL ,"+
			            "LAW_ORGAN_OPINION VARCHAR(255),"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_CONTACT_INFOMATION VARCHAR(255),"+
			            "REASON VARCHAR(255),"+
			            "SIGNATURE_DATE_1 DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE_2 DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE_3 DATETIME  NOT NULL ,"+
			            "STAFF_OPINION VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建分期（延期）缴纳罚款申请书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_DelayPayfineApplyAgree
 */
function createDelayPayfineApplyAgree(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_DELAYPAYFINEAPPLYAGREE(" +
			            "CASE_DELAYPAYFINEAPPLYAGREE_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "DELAY_OR_STAGE VARCHAR(255),"+
			            "DELAY_TO_DAY VARCHAR(20),"+
			            "DELAY_TO_MONTH VARCHAR(20),"+
			            "DELAY_TO_YEAR VARCHAR(20),"+
			            "DELIVERY_DAY VARCHAR(20) NOT NULL ,"+
			            "DELIVERY_MONTH VARCHAR(20) NOT NULL ,"+
			            "DELIVERY_YEAR VARCHAR(20) NOT NULL ,"+
			            "FILENO VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE VARCHAR(20) NOT NULL ,"+
			            "NOT_YET_PAID_AMOUNT DOUBLE PRECISION(2),"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PUNISH_AMOUNT DOUBLE PRECISION(2),"+
			            "STAGE_AMOUNT DOUBLE PRECISION(2),"+
			            "STAGE_NO VARCHAR(255),"+
			            "STAGE_TO_DAY VARCHAR(20),"+
			            "STAGE_TO_MONTH VARCHAR(20),"+
			            "STAGE_TO_YEAR VARCHAR(20),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建同意分期（延期）缴纳罚款通知书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_DOCUMENTRECEIPT
 */
function createDocumentReceipt(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_DOCUMENTRECEIPT(" +
			            "CASE_DOCUMENTRECEIPT_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "DELIVERY_UNIT VARCHAR(255),"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "RECEIVER VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建文书送达回证表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_DOCUMENTRECEIPT_DETAIL
 */
function createDocumentReceiptDetail(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_DOCUMENTRECEIPT_DETAIL(" +
			            "CASE_DOCUMENTRECEIPT_DETAIL_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "DELIVERY_PLACE VARCHAR(255),"+
			            "PROCESS_SERVER VARCHAR(255),"+
			            "DELIVERY_TYPE VARCHAR(255),"+
			            "DOCUMENT_NAME_NO VARCHAR(255) NOT NULL ,"+
			            "DOCUMENT_SIGNATURE VARCHAR(255),"+
			            "CASE_DOCUMENTRECEIPT_ID INTEGER(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建文书送达回证明细表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_ENTRUSTIDENTIFY_DETAIL
 */
function createEntrustIdentifyDetail(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_ENTRUSTIDENTIFY_DETAIL(" +
			            "CASE_ENTRUSTIDENTIFY_DETAIL_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "AMOUNT BIGINT(20),"+
			            "ITEM_NAME VARCHAR(255)  NOT NULL ,"+
			            "SPEC_MODEL VARCHAR(255),"+
			            "CASE_ENTRUSTIDENTIFY_ID INTEGER(255)  NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建委托鉴定书明细表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_ENTRUSTIDENTIFY
 */
function createEntrustIdentify(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_ENTRUSTIDENTIFY(" +
			            "CASE_ENTRUSTIDENTIFY_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "BEFORE_DATE DATETIME   NOT NULL ,"+
			            "ENTRUSTED_UNIT VARCHAR(255)  NOT NULL ,"+
			            "IDENTIFICATION_REQUIREMENTS VARCHAR(4000)  NOT NULL ,"+
			            "MAKE_DATE DATETIME ,"+
			            "CASE_BASICINFO_ID VARCHAR(255)  NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建委托鉴定书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_EVIDENCELIST
 */
function createEvidenceList(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_EVIDENCELIST(" +
			            "CASE_EVIDENCELIST_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ACCEPT_TREATMENT_ADDRESS VARCHAR(255)  NOT NULL ,"+
			            "ACCEPT_TREATMENT_DATE VARCHAR(20)  NOT NULL ,"+
			            "ACCEPT_TREATMENT_PERSON VARCHAR(255),"+
			            "CERTIFICATE_ID_1 VARCHAR(255)  NOT NULL ,"+
			            "CERTIFICATE_ID_2 VARCHAR(255)  NOT NULL ,"+
			            "MAKE_DATE DATETIME   NOT NULL ,"+
			            "PARTY VARCHAR(255),"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_AGE BIGINT(11)," +
			            "PARTY_ID_NO VARCHAR(255),"+
			            "PARTY_JOB VARCHAR(255),"+
			            "PARTY_MANAGER VARCHAR(255),"+
			            "PARTY_SEX VARCHAR(255),"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_ZIPCODE VARCHAR(255),"+
			            "PARTY_TYPE VARCHAR(255),"+
			            "SIGNATURE_DATE DATETIME   NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255)  NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建证据登记保存清单表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_EVIDENCELIST_DETAIL
 */
function createEvidenceListDetail(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_EVIDENCELIST_DETAIL(" +
			            "CASE_EVIDENCELIST_DETAIL_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "AMOUNT BIGINT(11),"+
			            "EVIDENCE_NAME VARCHAR(255),"+
			            "EVIDENCE_NO BIGINT(11)  NOT NULL ,"+
			            "SAVE_PLACE VARCHAR(255),"+
			            "SPEC VARCHAR(255),"+
			            "CASE_EVIDENCELIST_ID INTEGER(255)  NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建证据登记保存清单明细表失败:'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_EVIDENCETREATMENTDECISION
 */
function createEvidenceTreatmentDecision(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_EVIDENCETREATMENTDECISION(" +
			            "CASE_EVIDENCETREATMENTDECISION_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME   NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "SAVING_DAY VARCHAR(20) NOT NULL ,"+
			            "SAVING_ITEMS VARCHAR(255) NOT NULL ,"+
			            "SAVING_MONTH VARCHAR(20) NOT NULL ,"+
			            "SAVING_YEAR VARCHAR(20) NOT NULL ,"+
			            "TREATMENT_DECISION VARCHAR(255) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建证据登记保存处理决定书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_FILLINGAPPROVE
 */
function createFillingApprove(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_FILLINGAPPROVE(" +
			            "CASE_FILLINGAPPROVE_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ACCEPT_ORGAN_VIEW VARCHAR(255) NOT NULL ,"+
			            "ACCEPT_TIME DATETIME  NOT NULL ,"+
			            "ACCEPT_ORGAN_TIME DATETIME  NOT NULL ,"+
			            "APPROVAL_TIME DATETIME  NOT NULL ,"+
			            "APPROVAL_VIEW VARCHAR(255) NOT NULL ,"+
			            "BASE_INFO VARCHAR(255) NOT NULL ,"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CASE_NAME VARCHAR(255),"+
			            "CASE_SOURCE VARCHAR(255),"+
			            "ILLEGAL_LAW VARCHAR(255) NOT NULL ,"+
			            "PARTY VARCHAR(255),"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_AGE BIGINT(11),"+
			            "PARTY_ID_NO VARCHAR(255) NOT NULL ,"+
			            "PARTY_SEX VARCHAR(255),"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_TYPE VARCHAR(255),"+
			            "PARTY_UNIT_POSITION VARCHAR(255),"+
			            "PARTY_MANAGER VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建立案审批表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_HEARINGBULLETIN
 */
function createHearingBulletin(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_HEARINGBULLETIN(" +
			            "CASE_HEARINGBULLETIN_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "APPLY_DAY VARCHAR(20) NOT NULL ," +
			            "APPLY_MONTH VARCHAR(20) NOT NULL ," +
			            "APPLY_YEAR VARCHAR(20) NOT NULL ," +
			            "ATTENTIONS VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CONDITIONS VARCHAR(255),"+
			            "HEARGING_DAY VARCHAR(20) NOT NULL ,"+
			            "HEARGING_HOUR VARCHAR(20) NOT NULL ,"+
			            "HEARGING_MONTH VARCHAR(20) NOT NULL ,"+
			            "HEARGING_YEAR VARCHAR(20) NOT NULL ,"+
			            "HEARING_ORGAN VARCHAR(255) NOT NULL ,"+
			            "HEARING_PLACE VARCHAR(255) NOT NULL ,"+
			            "IDCARD_LETTER VARCHAR(255) NOT NULL ,"+
			            "LAW_NAME VARCHAR(255),"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "ORGAN_CONTACTOR VARCHAR(255),"+
			            "ORGAN_TEL VARCHAR(255) NOT NULL ,"+
			            "SIGNUP_END_DAY VARCHAR(20) NOT NULL ,"+
			            "SIGNUP_END_MONTH VARCHAR(20) NOT NULL ,"+
			            "SIGNUP_PLACE VARCHAR(255) NOT NULL ,"+
			            "SIGNUP_START_DAY VARCHAR(20) NOT NULL ,"+
			            "SIGNUP_START_MONTH VARCHAR(20) NOT NULL ,"+
			            "SIGNUP_START_YEAR VARCHAR(20) NOT NULL ,"+
			            "WORKING_END_HOUR VARCHAR(20) NOT NULL ,"+
			            "WORKING_START_HOUR VARCHAR(20) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建听证公告表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_HEARINGENTRUST
 */
function createHearingEntrust(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_HEARINGENTRUST(" +
			            "CASE_HEARINGENTRUST_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "ENTRUSTER VARCHAR(255) NOT NULL ,"+
			            "ENTRUSTER_ADDRESS VARCHAR(255) NOT NULL ,"+
			            "ENTRUSTER_POSITION VARCHAR(255) NOT NULL ,"+
			            "ENTRUSTER_SEX VARCHAR(255) NOT NULL ,"+
			            "ENTRUSTER_TEL VARCHAR(255) NOT NULL ,"+
			            "ENTRUSTER_UNIT VARCHAR(255) NOT NULL ,"+
			            "ENTRUSTER_ZIPCODE VARCHAR(255),"+
			            "PROXY VARCHAR(255) NOT NULL ,"+
			            "PROXY_ADDRESS VARCHAR(255) NOT NULL ,"+
			            "PROXY_PERMISSIONS VARCHAR(255) NOT NULL ,"+
			            "PROXY_POSITION VARCHAR(255) NOT NULL ,"+
			            "PROXY_SEX VARCHAR(255) NOT NULL ,"+
			            "PROXY_TEL VARCHAR(255) NOT NULL ,"+
			            "PROXY_UNIT VARCHAR(255) NOT NULL ,"+
			            "PROXY_ZIPCODE VARCHAR(255),"+
			            "SIGNATURE_DATE_1 DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE_2 DATETIME  NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建听证委托书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_HEARINGNOTES
 */
function createHearingNotes(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_HEARINGNOTES(" +
			            "CASE_HEARINGNOTES_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_2 VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_1 VARCHAR(255),"+
			            "HEARING_CLERKS VARCHAR(255) NOT NULL ,"+
			            "HEARGING_END_DAY VARCHAR(20) NOT NULL ,"+
			            "HEARGING_END_HOUR VARCHAR(20) NOT NULL ,"+
			            "HEARGING_END_MINUTE VARCHAR(20) NOT NULL ,"+
			            "HEARGING_END_MONTH VARCHAR(20) NOT NULL ,"+
			            "HEARGING_END_YEAR VARCHAR(20) NOT NULL ,"+
			            "HEARING_OFFICER VARCHAR(255) NOT NULL ,"+
			            "HEARING_ORGAN VARCHAR(255) NOT NULL ,"+
			            "HEARING_PLACE VARCHAR(255) NOT NULL ,"+
			            "HEARING_RECORD VARCHAR(255) NOT NULL ,"+
			            "HEARGING_START_DAY VARCHAR(20) NOT NULL ,"+
			            "HEARGING_START_HOUR VARCHAR(20) NOT NULL ,"+
			            "HEARGING_START_MINUTE VARCHAR(20) NOT NULL ,"+
			            "HEARGING_START_MONTH VARCHAR(20) NOT NULL ,"+
			            "HEARGING_START_YEAR VARCHAR(20) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "OTHER_PARTICIPANTS_AGE VARCHAR(255) NOT NULL ,"+
			            "OTHER_PARTICIPANTS_SEX VARCHAR(255) NOT NULL ,"+
			            "OTHER_PARTICIPANTS_UNIT_POSITION VARCHAR(255) NOT NULL ,"+
			            "OTHER_PARTICIPANTS VARCHAR(255) NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_MANAGER VARCHAR(255) NOT NULL ,"+
			            "PARTY_TEL VARCHAR(255) NOT NULL ,"+
			            "PRESIDING_HEARER VARCHAR(255) NOT NULL ,"+
			            "PROXY VARCHAR(255) NOT NULL ,"+
			            "PROXY_AGE VARCHAR(255) NOT NULL ,"+
			            "PROXY_SEX VARCHAR(255) NOT NULL ,"+
			            "PROXY_UNIT_POSITION VARCHAR(255) NOT NULL ,"+
			            "SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "STAFF_1 VARCHAR(255) NOT NULL ,"+
			            "STAFF_2 VARCHAR(255) NOT NULL ,"+
			            "THIRD_PARTY VARCHAR(255) NOT NULL ,"+
			            "THIRD_PARTY_AGE VARCHAR(255) NOT NULL ,"+
			            "THIRD_PARTY_SEX VARCHAR(255) NOT NULL ,"+
			            "THIRD_PARTY_UNIT_POSITION VARCHAR(255) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建听证笔录表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_HEARINGNOTICE
 */
function createHearingNotice(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_HEARINGNOTICE(" +
			            "CASE_HEARINGNOTICE_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "HEARING_PLACE VARCHAR(255) NOT NULL ,"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "HEARGING_DAY VARCHAR(20) NOT NULL ,"+
			            "HEARGING_HOUR VARCHAR(20) NOT NULL ,"+
			            "HEARGING_MINUTE VARCHAR(20) NOT NULL ,"+
			            "HEARGING_MONTH VARCHAR(20) NOT NULL ,"+
			            "HEARGING_YEAR VARCHAR(20) NOT NULL ,"+
			            "HEARING_CLERKS VARCHAR(255) NOT NULL ,"+
			            "HEARING_CLERKS_POSITION VARCHAR(255) NOT NULL ,"+
			            "HEARING_OFFICER_1 VARCHAR(255) NOT NULL ,"+
			            "HEARING_OFFICER_1_POSITION VARCHAR(255) NOT NULL ,"+
			            "HEARING_OFFICER_2 VARCHAR(255) NOT NULL ,"+
			            "HEARING_OFFICER_2_POSITION VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "ORGAN_ADDRESS VARCHAR(255) NOT NULL ,"+
			            "ORGAN_CONTACTOR VARCHAR(255) NOT NULL ,"+
			            "ORGAN_TEL VARCHAR(255) NOT NULL ,"+
			            "ORGAN_ZIPCODE VARCHAR(255) NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PRESIDING_HEARER VARCHAR(255) NOT NULL ,"+
			            "PRESIDING_HEARER_POSITION VARCHAR(255) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建听证通知书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_HEARINGREPORT
 */
function createHearingReport(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_HEARINGREPORT(" +
			            "CASE_HEARINGREPORT_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME VARCHAR(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "BASIC_INFO VARCHAR(255) NOT NULL ,"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "HEARING_CLERKS VARCHAR(255) NOT NULL ,"+
			            "HEARING_CONCLUSIONS_ADVICE VARCHAR(255) NOT NULL ,"+
			            "HEARING_OFFICER VARCHAR(255) NOT NULL ,"+
			            "LAW_ORGAN_OPINION VARCHAR(255) NOT NULL ,"+
			            "PRESIDING_HEARER VARCHAR(255) NOT NULL ,"+
			            "PRESIDING_HEARER_SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建听证报告书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_IDENTIFYOPINION
 */
function createIdentifyOpinion(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_IDENTIFYOPINION(" +
			            "CASE_IDENTIFYOPINION_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CONTENT_PURPOSE VARCHAR(255) NOT NULL ,"+
			            "ENTRUST_UNIT VARCHAR(255) NOT NULL ,"+
			            "IDENTIFY_DATE DATETIME  NOT NULL ,"+
			            "IDENTIFY_OPINION VARCHAR(255) NOT NULL ,"+
			            "IDENTIFY_PERSON VARCHAR(255) NOT NULL ,"+
			            "IDENTIFY_PLACE VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "POSITION_JOBTITLE VARCHAR(255) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建鉴定意见书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_ILLEGALACTION
 */
function createIllegalAction(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_ILLEGALACTION(" +
			            "CASE_ILLEGALACTION_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "HEARING_RIGHT VARCHAR(255),"+
			            "ILLEGAL_LAW VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "ORGAN_ADDRESS VARCHAR(255) NOT NULL ,"+
			            "ORGAN_CONTACTOR VARCHAR(255) NOT NULL ,"+
			            "ORGAN_TEL VARCHAR(255) NOT NULL ,"+
			            "ORGAN_ZIPCODE VARCHAR(255),"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PUNISH_DECISION VARCHAR(255),"+
			            "PUNISH_DECISION_CAPITAL VARCHAR(255) NOT NULL ,"+
			            "PUNISH_LAW VARCHAR(255) NOT NULL ,"+
			            "STATEMENT_EXPLAIN_RIGHT VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建违法行为通知书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_IMPORTANTCASEGROUPDISCUSSION
 */
function createImportantCaseGroupDiscussion(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_IMPORTANTCASEGROUPDISCUSSION(" +
			            "CASE_IMPORTANTCASEGROUPDISCUSSION_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "CASE_SUMMARY VARCHAR(4000),"+
			            "CONCLUSSION_OPINION VARCHAR(4000),"+
			            "DISCUSSION_END_DAY VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_END_HOUR VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_END_MINUTE VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_END_MONTH VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_END_YEAR VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_PLACE VARCHAR(255) NOT NULL ,"+
			            "DISCUSSION_RECORD VARCHAR(4000),"+
			            "DISCUSSION_START_DAY VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_START_HOUR VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_START_MINUTE VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_START_MONTH VARCHAR(20) NOT NULL ,"+
			            "DISCUSSION_START_YEAR VARCHAR(20) NOT NULL ,"+
			            "PRESENT_MEMBERS_NAME_POSITION VARCHAR(4000),"+
			            "PRESIDING_HEARER VARCHAR(255),"+
			            "RECORDER VARCHAR(255),"+
			            "REPORTER VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建重大案件集体讨论记录表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_INQUESTNOTES
 */
function createInquestNotes(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_INQUESTNOTES(" +
			            "CASE_INQUESTNOTES_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_1 VARCHAR(255),"+
			            "CERTIFICATE_ID_2 VARCHAR(255),"+
			            "INQUEST_END_DAY VARCHAR(20) NOT NULL ,"+
			            "INQUEST_END_HOUR VARCHAR(20) NOT NULL ,"+
			            "INQUEST_END_MINUTE VARCHAR(20) NOT NULL ,"+
			            "INQUEST_END_MONTH VARCHAR(20) NOT NULL ,"+
			            "INQUEST_PLACE VARCHAR(255) NOT NULL ,"+
			            "INQUEST_START_DAY VARCHAR(20) NOT NULL ,"+
			            "INQUEST_START_HOUR VARCHAR(20) NOT NULL ,"+
			            "INQUEST_START_MINUTE VARCHAR(20) NOT NULL ,"+
			            "INQUEST_START_MONTH VARCHAR(20) NOT NULL ,"+
			            "INQUEST_YEAR VARCHAR(20) NOT NULL ,"+
			            "INVITEES VARCHAR(255) NOT NULL ,"+
			            "INVITEES_UNIT_POSITION VARCHAR(255) NOT NULL ,"+
			            "PARTY VARCHAR(255),"+
			            "PARTY_ADDRESS VARCHAR(255)," +
			            "PARTY_AGE BIGINT(11)," +
			            "PARTY_ID_NO VARCHAR(255)," +
			            "PARTY_SEX VARCHAR(255),"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_UNIT_POSITION VARCHAR(255)," +
			            "RECORDER VARCHAR(255) NOT NULL ,"+
			            "RECORDER_UNIT_POSITION VARCHAR(255) NOT NULL ,"+
			            "RESULT VARCHAR(255) NOT NULL ,"+
			            "STAFF_1 VARCHAR(255),"+
			            "STAFF_2 VARCHAR(255),"+
			            "UNIT_POSITION_1 VARCHAR(255),"+
			            "UNIT_POSITION_2 VARCHAR(255),"+
			            "WEATHER VARCHAR(255) NOT NULL ,"+
			            "ORGANID BIGINT(20) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建勘验笔录表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_INQUIRYNOTES
 */
function createInquiryNotes(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_INQUIRYNOTES(" +
			            "CASE_INQUIRYNOTES_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CERTIFICATE_ID_1 VARCHAR(255),"+
			            "CERTIFICATE_ID_2 VARCHAR(255),"+
			            "INQUIRIED VARCHAR(255) NOT NULL ,"+
			            "INQUIRIED_ADDRESS VARCHAR(255) NOT NULL ,"+
			            "INQUIRIED_AGE BIGINT(20),"+
			            "INQUIRIED_ID_NO VARCHAR(255) NOT NULL ,"+
			            "INQUIRIED_RELATION VARCHAR(255) NOT NULL ,"+
			            "INQUIRIED_SEX VARCHAR(20),"+
			            "INQUIRIED_TEL VARCHAR(20),"+
			            "INQUIRIED_TIME DATETIME ,"+
			            "INQUIRIED_UNIT_POSITION VARCHAR(255),"+
			            "INQUIRY_ADDRESS VARCHAR(255),"+
			            "INQUIRY_DAY VARCHAR(20) NOT NULL ,"+
			            "INQUIRY_END_HOUR VARCHAR(20) NOT NULL ,"+
			            "INQUIRY_END_MINUTE VARCHAR(20) NOT NULL ,"+
			            "INQUIRY_INDEX BIGINT(20) NOT NULL ," +
			            "INQUIRY_SHARE BIGINT(20) NOT NULL ," +
			            "INQUIRY_MONTH VARCHAR(20) NOT NULL ,"+
			            "INQUIRY_STAFF VARCHAR(255)," +
			            "INQUIRY_START_HOUR VARCHAR(20)," +
			            "INQUIRY_START_MINUTE VARCHAR(20),"+
			            "INQUIRY_TIME DATETIME ,"+
			            "INQUIRY_YEAR VARCHAR(20) NOT NULL ," +
			            "ORGAN_NAME VARCHAR(255),"+
			            "QUESTION VARCHAR(4000),"+
			            "ANSWER VARCHAR(4000),"+
			            "RECORD_STAFF VARCHAR(255),"+
			            "STAFF_1 VARCHAR(255),"+
			            "STAFF_2 VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建询问笔录表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_NONDELAYPAYFINEAPPLY
 */
function createNondelayPayfineApply(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_NONDELAYPAYFINEAPPLY(" +
			            "CASE_NONDELAYPAYFINEAPPLY_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "APPLY_DAY VARCHAR(20) NOT NULL ,"+
			            "APPLY_MONTH VARCHAR(20) NOT NULL ,"+
			            "APPLY_YEAR VARCHAR(20) NOT NULL ,"+
			            "DELIVERY_DAY VARCHAR(20) NOT NULL ,"+
			            "DELIVERY_MONTH VARCHAR(20) NOT NULL ,"+
			            "DELIVERY_YEAR VARCHAR(20) NOT NULL ,"+
			            "FILENO VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PUNISH_AMOUNT DOUBLE PRECISION(2) NOT NULL ,"+
			            "REASON VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建不予分期（延期）缴纳罚款通知书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_NONPUNISHMENTDECISION
 */
function createNonpunishmentDecision(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_NONPUNISHMENTDECISION(" +
			            "CASE_NONPUNISHMENTDECISION_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ARTICLE VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CLAUSE VARCHAR(255),"+
			            "GOVERNMENT VARCHAR(255),"+
			            "ILLEGAL_FACTS_EVIDENCE VARCHAR(255),"+
			            "ITEM VARCHAR(255),"+
			            "LAW_NAME VARCHAR(255),"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "RECONSIDERATION_ORGAN VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建不予行政处罚决定书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_ORDERCORRECT
 */
function createOrderCorrect(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_ORDERCORRECT(" +
			            "CASE_ORDERCORRECT_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_1 VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_2 VARCHAR(255) NOT NULL ,"+
			            "CONTENT1 VARCHAR(255),"+
			            "CONTENT2 VARCHAR(255),"+
			            "CONTENT3 VARCHAR(255),"+
			            "CONTENT4 VARCHAR(255),"+
			            "CORRECTION_DAY VARCHAR(20) NOT NULL ,"+
			            "CORRECTION_MONTH VARCHAR(20) NOT NULL ,"+
			            "CORRECTION_YEAR VARCHAR(20) NOT NULL ,"+
			            "DEADLINE_CORRECTION VARCHAR(255),"+
			            "FACT1 VARCHAR(255),"+
			            "FACT2 VARCHAR(255),"+
			            "FACT3 VARCHAR(255),"+
			            "FACT4 VARCHAR(255),"+
			            "IMMEDIATE_CORRECTION VARCHAR(255),"+
			            "LAW VARCHAR(255),"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建责令改正通知书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_PUNISHMENTDECISION
 */
function createPunishementDecision(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_PUNISHMENTDECISION(" +
			            "CASE_PUNISHMENTDECISION_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ACCOUNT VARCHAR(255),"+
			            "BANK VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "GOVERNMENT VARCHAR(255),"+
			            "ILLEGAL_FACTS_EVIDENCE VARCHAR(255) NOT NULL ,"+
			            "ILLEGAL_LAW VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_ID_NO VARCHAR(255),"+
			            "PARTY_JOB VARCHAR(255),"+
			            "PARTY_MANAGER VARCHAR(255),"+
			            "PUNISH_TPYE  VARCHAR(255) NOT NULL ,"+
			            "PARTY_SEX VARCHAR(255),"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_TYPE VARCHAR(255),"+
			            "PUNISH_DECISION VARCHAR(255),"+
			            "PUNISH_DECISION_CAPITAL VARCHAR(255) NOT NULL ,"+
			            "PUNISH_LAW VARCHAR(255) NOT NULL ,"+
			            "RECONSIDERATION_ORGAN VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建行政处罚决定书表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_PUNISHMENTFINALREPORT
 */
function createPunishmentFinalReport(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_PUNISHMENTFINALREPORT(" +
			            "CASE_PUNISHMENTFINALREPORT_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255) NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_SEX VARCHAR(255) NOT NULL ,"+
			            "PARTY_TYPE VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL ,"+
			            "AUDIT_OPINION VARCHAR(4000) NOT NULL ,"+
			            "EXECUTION VARCHAR(4000) NOT NULL ,"+
			            "LAW_ORGAN_OPINION VARCHAR(4000) NOT NULL ,"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_AGE VARCHAR(255) NOT NULL ,"+
			            "PARTY_ID_NO VARCHAR(255),"+
			            "PARTY_MANAGER VARCHAR(255),"+
			            "PARTY_POSITION VARCHAR(255),"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_UNIT VARCHAR(255),"+
			            "PARTY_ZIPCODE VARCHAR(255),"+
			            "PROCESS_RESULT VARCHAR(4000) NOT NULL ,"+
			            "SIGNATURE_DATE_1 DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE_2 DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE_3 DATETIME  NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建处罚结案报告表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_COVER
 */
function createCover(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_COVER(" +
			            "CASE_COVER_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_NAME VARCHAR(255),"+
			            "PARTY VARCHAR(100),"+
			            "PARTY_UNIT_ADDRESS VARCHAR(255),"+
			            "OPERATOR VARCHAR(100),"+
			            "FILENO VARCHAR(100),"+
			            "MAKE_DATE DATETIME,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL"+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建案卷失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_FILELIST
 */
function createFileList(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_FILELIST(" +
			            "CASE_FILELIST_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL"+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建卷内目录失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_FILELIST_DETAIL
 */
function createFileListDetail(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_FILELIST_DETAIL(" +
			            "CASE_FILELIST_DETAIL_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "FILE_ORDER INTEGER(100),"+
			            "FILE_NAME VARCHAR(255),"+
			            "FILENO VARCHAR(100),"+
			            "FILE_PAGE INTEGER(100),"+
			            "MAKE_DATE DATETIME,"+
			            "CASE_FILELIST_ID INTEGER(255)"+
			            ")",
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建卷内目录明细表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_FILENOTE
 */
function createFileNote(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_FILENOTE(" +
			            "CASE_FILENOTE_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "FILE_DESCRIPTION VARCHAR(255),"+
			            "FILLING_PERSON VARCHAR(100),"+
			            "CHECK_PERSON VARCHAR(255),"+
			            "FILLING_TIME DATETIME,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL"+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建卷内备考表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_REPORTRECORD
 */
function createReportRecord(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_REPORTRECORD(" +
			            "CASE_REPORTRECORD_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ADDRESS_UNIT VARCHAR(255),"+
			            "AGE BIGINT(20),"+
			            "ID_NO VARCHAR(255),"+
			            "REPORT_CONTENT VARCHAR(255),"+
			            "REPORT_TIME VARCHAR(20) NOT NULL ,"+
			            "REPORT_TYPE VARCHAR(255),"+
			            "REPORTER VARCHAR(255),"+
			            "SEX VARCHAR(255),"+
			            "SIGNATURE_DATE_1 DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE_2 DATETIME  NOT NULL ,"+
			            "TEL VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255)"+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建举报记录表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_SAMPLEEVIDENCE
 */
function createSampleEvidence(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_SAMPLEEVIDENCE(" +
			            "CASE_SAMPLEEVIDENCE_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CERTIFICATE_ID_1 VARCHAR(255),"+
			            "CERTIFICATE_ID_2 VARCHAR(255),"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "SAMPLE_END_DAY VARCHAR(20) NOT NULL ,"+
			            "SAMPLE_END_HOUR VARCHAR(20) NOT NULL ,"+
			            "SAMPLE_END_MINUTE VARCHAR(20) NOT NULL ,"+
			            "SAMPLE_END_MONTH VARCHAR(20) NOT NULL ,"+
			            "SAMPLE_ORGAN VARCHAR(255) NOT NULL ,"+
			            "SAMPLE_ORGAN_TEL VARCHAR(255) NOT NULL ,"+
			            "SAMPLE_PLACE VARCHAR(255) NOT NULL ,"+
			            "SAMPLE_START_DAY VARCHAR(20) NOT NULL ,"+
			            "SAMPLE_START_HOUR VARCHAR(20) NOT NULL ,"+
			            "SAMPLE_START_MINUTE VARCHAR(20),"+
			            "SAMPLE_START_MONTH VARCHAR(20) NOT NULL ,"+
			            "SAMPLE_YEAR VARCHAR(20) NOT NULL ,"+
			            "SAMPLED VARCHAR(255) NOT NULL ,"+
			            "SAMPLED_ADDRESS VARCHAR(255) NOT NULL ,"+
			            "SAMPLED_LEADER VARCHAR(255) NOT NULL ,"+
			            "SAMPLED_MANAGER VARCHAR(255) NOT NULL ,"+
			            "SAMPLED_TEL VARCHAR(255) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建抽样取证凭证表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_SAMPLEEVIDENCE_DETAIL
 */
function createSampleEvidenceDetail(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_SAMPLEEVIDENCE_DETAIL(" +
			            "CASE_SAMPLEEVIDENCE_DETAIL_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "AMOUNT BIGINT(11),"+
			            "ITEM_NAME VARCHAR(255),"+
			            "ITEM_NO BIGINT(11) NOT NULL ,"+
			            "SAMPLED_PLACE VARCHAR(255),"+
			            "SPEC_BATCH_NO VARCHAR(255),"+
			            "CASE_SAMPLEEVIDENCE_ID INTEGER(255)"+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建抽样取证凭证明细表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_SCENENOTES
 */
function createSceneNotes(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_SCENENOTES(" +
			            "CASE_SCENENOTES_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ADDRESS VARCHAR(255),"+
			            "CERTIFICATE_ID_1 VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_2 VARCHAR(255) NOT NULL ,"+
			            "FILLING_PLACE VARCHAR(255) NOT NULL ,"+
			            "ID_NO VARCHAR(255),"+
			            "ILLEGAL_FACTS VARCHAR(255),"+
			            "NAME VARCHAR(255),"+
			            "RECORDER VARCHAR(255),"+
			            "RELATION VARCHAR(20),"+
			            "SCENE_DAY VARCHAR(20) NOT NULL ,"+
			            "SCENE_END_HOUR VARCHAR(20) NOT NULL ,"+
			            "SCENE_END_MINUTE VARCHAR(20) NOT NULL ,"+
			            "SCENE_MONTH VARCHAR(20) NOT NULL ,"+
			            "SCENE_START_HOUR VARCHAR(20) NOT NULL ,"+
			            "SCENE_START_MINUTE VARCHAR(20) NOT NULL ,"+
			            "SCENE_YEAR VARCHAR(20) NOT NULL ,"+
			            "SEX VARCHAR(20),"+
			            "SIGNATURE_DATE_1 DATETIME  NOT NULL ," +
			            "SIGNATURE_DATE_2 DATETIME  NOT NULL ," +
			            "STAFF_1 VARCHAR(20) NOT NULL ,"+
			            "STAFF_2 VARCHAR(20) NOT NULL ,"+
			            "TEL VARCHAR(20)," +
			            "UNIT_POSITION VARCHAR(255),"+
			            "VEHICLE_ID VARCHAR(255),"+
			            "VEHICLE_TYPE VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建现场笔录表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_SPOTPUNISHMENTDECISION
 */
function createSpotPunishmentDecision(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_SPOTPUNISHMENTDECISION(" +
			            "CASE_SPOTPUNISHMENTDECISION_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "ACCOUNT VARCHAR(255),"+
			            "BANK VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_1 VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_2 VARCHAR(255) NOT NULL ,"+
			            "GOVERNMENT VARCHAR(255),"+
			            "ILLEGAL_FACTS_EVIDENCE VARCHAR(255) NOT NULL ,"+
			            "ILLEGAL_LAW VARCHAR(255) NOT NULL ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_ID_NO VARCHAR(255),"+
			            "PARTY_JOB VARCHAR(255),"+
			            "PARTY_MANAGER VARCHAR(255),"+
			            "PARTY_SEX VARCHAR(255) NOT NULL ,"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_TYPE VARCHAR(255),"+
			            "PERFORMANCE_METHOD VARCHAR(255),"+
			            "PUNISH_DECISION VARCHAR(255),"+
			            "PUNISH_DECISION_CAPITAL VARCHAR(255) NOT NULL ,"+
			            "PUNISH_LAW VARCHAR(255) NOT NULL ,"+
			            "RECONSIDERATION_ORGAN VARCHAR(255),"+
			            "SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建行政（当场）处罚决定书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_STATEMENTEXPLAIN
 */
function createStatementExplain(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_STATEMENTEXPLAIN(" +
			            "CASE_STATEMENTEXPLAIN_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CERTIFICATE_ID_1 VARCHAR(255),"+
			            "CERTIFICATE_ID_2 VARCHAR(255),"+
			            "CONTENT VARCHAR(4000) NOT NULL ,"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "PARTY_SEX VARCHAR(255) NOT NULL ,"+
			            "PARTY_TEL VARCHAR(255),"+
			            "PARTY_UNIT_POSITION VARCHAR(255),"+
			            "PARTY_ZIPCODE VARCHAR(255),"+
			            "PLACE VARCHAR(255) NOT NULL ,"+
			            "RECORDER VARCHAR(255),"+
			            "SIGNATURE_DATE DATETIME  NOT NULL ,"+
			            "STAFF_1 VARCHAR(255),"+
			            "STAFF_2 VARCHAR(255),"+
			            "STATEMENT_EXPLAIN_DAY VARCHAR(20) NOT NULL ,"+
			            "STATEMENT_EXPLAIN_END_HOUR VARCHAR(20) NOT NULL ,"+
			            "STATEMENT_EXPLAIN_END_MINUTE VARCHAR(20) NOT NULL ,"+
			            "STATEMENT_EXPLAIN_MONTH VARCHAR(20) NOT NULL ,"+
			            "STATEMENT_EXPLAIN_START_HOUR VARCHAR(20) NOT NULL ,"+
			            "STATEMENT_EXPLAIN_START_MINUTE VARCHAR(20) NOT NULL ,"+
			            "STATEMENT_EXPLAIN_YEAR VARCHAR(20) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建陈述申辩书表失败'); 
			            }
				);
		    }
		);
	}
}
/**
 * 创建数据表 CASE_DOCU_WITHHOLDCERTIFICATE
 * @param callback
 */
function createWithholdCertificate(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_WITHHOLDCERTIFICATE(" +
			            "CASE_WITHHOLDCERTIFICATE_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "CERTIFICATE_ID_1 VARCHAR(255),"+
			            "CERTIFICATE_ID_2 VARCHAR(255),"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "PARTY_ADDRESS VARCHAR(255),"+
			            "VEHICLESHIPID VARCHAR(100),"+
			            "VEHICLESHIPTYPE VARCHAR(100),"+
			            "DRIVE_PARTY VARCHAR(255),"+
			            "DRIVE_NO VARCHAR(100),"+
			            "DRIVE_ADDRESS VARCHAR(255),"+
			            "RELATION VARCHAR(100)," +
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE_1 DATETIME  NOT NULL ,"+
			            "SIGNATURE_DATE_2 DATETIME  NOT NULL ,"+
			            "FILLINGPLACE VARCHAR(255),"+
			            "ORGANNAME VARCHAR(255),"+
			            "ORGANTEL VARCHAR(100),"+
			            "RECONSIDERATION_ORGAN VARCHAR(255),"+
			            "VEHICLEPROFILE VARCHAR(255),"+
			            "WITHHOLD_YEAR VARCHAR(20) NOT NULL ,"+
			            "WITHHOLD_MONTH VARCHAR(20) NOT NULL ,"+
			            "WITHHOLD_DAY VARCHAR(20) NOT NULL ,"+
			            "WITHHOLD_HOUR VARCHAR(20) NOT NULL ,"+
			            "WITHHOLD_MINUTE VARCHAR(20) NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建暂扣凭证失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_ADMINISTRATIVENOTICE
 * @param callback
 */
function createAdministrativeNotice(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_ADMINISTRATIVENOTICE(" +
			            "CASE_ADMINISTRATIVENOTICE_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "PARTY VARCHAR(255) NOT NULL ,"+
			            "CASEID_NO VARCHAR(255) NOT NULL ,"+
			            "CASEID_WORD VARCHAR(255) NOT NULL ,"+
			            "CASEID_YEAR VARCHAR(255) NOT NULL ,"+
			            "ADMIN_YEAR VARCHAR(20) NOT NULL ,"+
			            "ADMIN_MONTH VARCHAR(20) NOT NULL ,"+
			            "ADMIN_DAY VARCHAR(20) NOT NULL ,"+
			            "VEHICLE_SHIP_ID VARCHAR(255) ,"+
			            "VEHICLE_CHECK_TON BIGINT(20) ,"+
			            "VEHICLE_SENCE_TON BIGINT(20) ,"+
			            "OTHER_1 VARCHAR(4000) ,"+
			            "OTHER_2 VARCHAR(4000) ,"+
			            "CCERT_ID VARCHAR(255) ,"+
			            "CCERT_NAME VARCHAR(255) ,"+
			            "ILLEGAL_LAW_ITEM VARCHAR(255) ,"+
			            "PUNISH_LAW_ITEM VARCHAR(255) ,"+
			            "ORGAN_ADDRESS VARCHAR(255) ,"+
			            "ORGAN_ZIPCODE VARCHAR(255) ,"+
			            "MAKE_DATE DATETIME  NOT NULL ,"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
			            ")", 
			            [],
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建行政强制措施通知书表失败'); 
			            }
			    );
			}
		);
	}
}


/**
 * 创建数据表 CASE_DOCU_SUSPENSIONVEHICLE
 * @param callback
 */
function createSuspensionVehicleDecision(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql(
							"CREATE TABLE IF NOT EXISTS CASE_DOCU_SUSPENSIONVEHICLE(" +
							"CASE_SUSPENSIONVEHICLE_ID INTEGER primary key AutoIncrement," +
							"CREATE_ID VARCHAR(100)," +
							"CREATE_NAME varchar(255)," +
							"CREATE_TIME DATETIME ," +
							"MODIFY_ID VARCHAR(100)," +
							"MODIFY_TIME DATETIME ," +
							"NOTE VARCHAR(255),"+
							"PARTY VARCHAR(255) NOT NULL ,"+
							"PARTY_TYPE VARCHAR(255),"+
							"PARTYIDNO VARCHAR(255),"+
							"PARTYSEX VARCHAR(20),"+
							"PARTYUNITPOSITION VARCHAR(255),"+
							"PARTYADDRESS VARCHAR(255),"+
							"PARTYMANAGER VARCHAR(255),"+
							"VEHICLERELATIONSHIP VARCHAR(255),"+
							"PARTYTEL VARCHAR(255),"+
							"CASEID_NO VARCHAR(255) NOT NULL ,"+
							"CASEID_WORD VARCHAR(255) NOT NULL ,"+
							"CASEID_YEAR VARCHAR(255) NOT NULL ,"+
							"SUSPEN_YEAR VARCHAR(20) NOT NULL ,"+
							"SUSPEN_MONTH VARCHAR(20) NOT NULL ,"+
							"SUSPEN_DAY VARCHAR(20) NOT NULL ,"+
							"SUSPEN_HOUR VARCHAR(20) NOT NULL ,"+
							"VEHICLE_SHIP_ID VARCHAR(255) ,"+
							"TEMPORARILY_DATE VARCHAR(255) ,"+
							"TEMPORARILY_ADDRESS VARCHAR(255) ,"+
							"IMGNUM VARCHAR(255) ,"+
							"RECONSIDERATION_ORGAN VARCHAR(255) ,"+
							"SUSPEN_TIME DATETIME ,"+
							"CERTIFICATE_ID_1 VARCHAR(255) ,"+
							"CERTIFICATE_ID_2 VARCHAR(255) ,"+
							"MAKE_DATE DATETIME  NOT NULL ,"+
							"CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
							")", 
							[],
							function(tx,result){ 
								if(typeof(callback)=='function'){
									callback();
								}
							}, 
							function(tx,error){
								message('创建暂扣车辆行政强制措施决定书表失败'); 
							}
					);
				}
		);
	}
}

/**
 * 创建数据表
 * @param callback
 */
function createAdministrationEnforceLawFile(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql(
							"CREATE TABLE IF NOT EXISTS CASE_DOCU_ADMINENFORCEFILE(" +
							"CASE_ADMINENFORCEFILE_ID INTEGER primary key AutoIncrement," +
							"CREATE_ID VARCHAR(100)," +
							"CREATE_NAME VARCHAR(255)," +
							"CREATE_TIME DATETIME ," +
							"MODIFY_ID VARCHAR(100)," +
							"MODIFY_TIME DATETIME ," +
							"NOTE VARCHAR(255),"+
							"CASE_ORGANNAME VARCHAR(255),"+
							"CASE_SERIALNUMBER VARCHAR(255),"+
							"CASEID_NO VARCHAR(255) NOT NULL ,"+
							"CASEID_WORD VARCHAR(255) NOT NULL ,"+
							"CASEID_YEAR VARCHAR(255) NOT NULL ,"+
							"CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
							")", 
							[],
							function(tx,result){ 
								if(typeof(callback)=='function'){
									callback();
								}
							}, 
							function(tx,error){
								message('创建湖北省交通行政执法卷宗表失败'); 
							}
					);
				}
		);
	}
}

/**
 * 创建数据表
 * @param callback
 */
function createRoadCaseFile(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql(
							"CREATE TABLE IF NOT EXISTS CASE_DOCU_ROADCASEFILE(" +
							"CASE_ROADCASEFILE_ID INTEGER primary key AutoIncrement," +
							"CREATE_ID VARCHAR(100)," +
							"CREATE_NAME VARCHAR(255)," +
							"CREATE_TIME DATETIME ," +
							"MODIFY_ID VARCHAR(100)," +
							"MODIFY_TIME DATETIME ," +
							"NOTE VARCHAR(255),"+
							"CASENAME VARCHAR(255),"+
							"PARTY VARCHAR(255),"+
							"ORGANANDSTAFF VARCHAR(255),"+
							"PUNISH_AMOUNT DOUBLE(255),"+
							"FILLING_DATE DATETIME(255),"+
							"CLOSE_DATE DATETIME(255),"+
							"PIGEONHOLE_DATE DATETIME(255),"+
							"SAFETERM VARCHAR(255),"+
							"CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
							")", 
							[],
							function(tx,result){ 
								if(typeof(callback)=='function'){
									callback();
								}
							}, 
							function(tx,error){
								message('创建湖北省公路路政案件卷宗表失败'); 
							}
					);
				}
		);
	}
}

/**
 * 创建数据表
 * @param callback
 */
function createVehicleToolsDetainVoucher(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql(
							"CREATE TABLE IF NOT EXISTS CASE_DOCU_VEHICLETOOLVOUCHER(" +
							"CASE_VEHICLETOOLVOUCHER_ID INTEGER primary key AutoIncrement," +
							"CREATE_ID VARCHAR(100)," +
							"CREATE_NAME VARCHAR(255)," +
							"CREATE_TIME DATETIME ," +
							"MODIFY_ID VARCHAR(100)," +
							"MODIFY_TIME DATETIME ," +
							"NOTE VARCHAR(255),"+
							"CASEID_NO VARCHAR(255) NOT NULL ,"+
							"CASEID_WORD VARCHAR(255) NOT NULL ,"+
							"CASEID_YEAR VARCHAR(255) NOT NULL ,"+
							"PARTY_TYPE VARCHAR(255),"+
							"PARTY VARCHAR(255),"+
							"PARTY_ADDRESS VARCHAR(255),"+
							"VEHICLESHIPID VARCHAR(255),"+
							"VEHICLEBRANDMODEL VARCHAR(255),"+
							"TOOLNAME VARCHAR(255),"+
							"TOOLBRANDMODEL VARCHAR(255),"+
							"DRIVER_NAME VARCHAR(255),"+
							"DRIVER_NO VARCHAR(255),"+
							"DRIVER_NEXUS VARCHAR(255),"+
							"DRIVER_ADDRESS VARCHAR(255),"+
							"DETAIN_YEAR VARCHAR(10),"+
							"DETAIN_MONTH VARCHAR(10),"+
							"DETAIN_DAY VARCHAR(10),"+
							"DETAIN_HOUR VARCHAR(10),"+
							"DETAIN_MINUTE VARCHAR(10),"+
							"DETAIN_ADDRESS VARCHAR(255),"+
							"DETAIN_DATE DATETIME,"+
							"HANDLE_DAY VARCHAR(255),"+
							"HANDLE_ORGAN VARCHAR(255),"+
							"ORGANTEL VARCHAR(100),"+
							"RECONSIDERATIOINORGAN VARCHAR(255),"+
							"VEHICLETOOLPROFILE VARCHAR(4000),"+
							"SUSPENTIME DATETIME,"+
							"CERTIFICATEID1 VARCHAR(255),"+
							"CERTIFICATEID2 VARCHAR(255),"+
							"MAKEDATE DATETIME,"+
							"CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
							")", 
							[],
							function(tx,result){ 
								if(typeof(callback)=='function'){
									callback();
								}
							}, 
							function(tx,error){
								message('创建车辆（工具）暂扣凭证表失败'); 
							}
					);
				}
		);
	}
}

/**
 * 创建数据表
 * @param callback
 */
function createVehicleDetainVoucher(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql(
							"CREATE TABLE IF NOT EXISTS CASE_DOCU_VEHICLEVOUCHER(" +
							"CASE_VEHICLEVOUCHER_ID INTEGER primary key AutoIncrement," +
							"CREATE_ID VARCHAR(100)," +
							"CREATE_NAME VARCHAR(255)," +
							"CREATE_TIME DATETIME ," +
							"MODIFY_ID VARCHAR(100)," +
							"MODIFY_TIME DATETIME ," +
							"NOTE VARCHAR(255),"+
							"CASEID_NO VARCHAR(255) NOT NULL ,"+
							"CASEID_WORD VARCHAR(255) NOT NULL ,"+
							"CASEID_YEAR VARCHAR(255) NOT NULL ,"+
							"PARTY_TYPE VARCHAR(255),"+
							"PARTY VARCHAR(255),"+
							"PARTY_ADDRESS VARCHAR(255),"+
							"VEHICLESHIPID VARCHAR(255),"+
							"VEHICLEBRANDMODEL VARCHAR(255),"+
							"DRIVER_NAME VARCHAR(255),"+
							"DRIVER_NO VARCHAR(255),"+
							"DRIVER_NEXUS VARCHAR(255),"+
							"DRIVER_ADDRESS VARCHAR(255),"+
							"DETAIN_YEAR VARCHAR(10),"+
							"DETAIN_MONTH VARCHAR(10),"+
							"DETAIN_DAY VARCHAR(10),"+
							"DETAIN_HOUR VARCHAR(10),"+
							"DETAIN_MINUTE VARCHAR(10),"+
							"DETAIN_ADDRESS VARCHAR(255),"+
							"DETAIN_DATE DATETIME,"+
							"HANDLE_ORGAN VARCHAR(255),"+
							"ORGANTEL VARCHAR(100),"+
							"RECONSIDERATIOINORGAN VARCHAR(255),"+
							"VEHICLEPROFILE VARCHAR(4000),"+
							"SUSPENTIME DATETIME,"+
							"CERTIFICATEID1 VARCHAR(255),"+
							"CERTIFICATEID2 VARCHAR(255),"+
							"MAKEDATE DATETIME,"+
							"CASE_BASICINFO_ID VARCHAR(255) NOT NULL "+
							")", 
							[],
							function(tx,result){ 
								if(typeof(callback)=='function'){
									callback();
								}
							}, 
							function(tx,error){
								message('创建车辆暂扣凭证表失败'); 
							}
					);
				}
		);
	}
}


/**
 * 创建数据表 CASE_DOCU_FILECLANLIST
 */
function createFileClanList(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_FILECLANLIST(" +
			            "CASE_FILECLANLIST_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "CASE_BASICINFO_ID VARCHAR(255) NOT NULL"+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建卷宗目录失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建数据表 CASE_DOCU_FILECLANLIST_DETAIL
 */
function createFileClanListDetail(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DOCU_FILECLANLIST_DETAIL(" +
			            "CASE_FILECLANLIST_DETAIL_ID INTEGER primary key AutoIncrement," +
			            "CREATE_ID VARCHAR(100)," +
			            "CREATE_NAME varchar(255)," +
			            "CREATE_TIME DATETIME ," +
			            "MODIFY_ID VARCHAR(100)," +
			            "MODIFY_TIME DATETIME ," +
			            "NOTE VARCHAR(255),"+
			            "FILECLANORDER INTEGER(100),"+
			            "FILECLANNAME VARCHAR(255),"+
			            "FILECLANPAGE INTEGER(100),"+
			            "FILECLANNOTE VARCHAR(255),"+
			            "CASE_FILECLANLIST_ID INTEGER(255)"+
			            ")",
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建卷宗目录明细表失败'); 
			            }
				);
		    }
		);
	}
}


/**
 * 对应的创建语句，放在各自表中对已的JS中；
 * 注意：重复创建表不会出错，但是
 * 创建文书表
 */
function createTables(){
	createReportRecord();
	createAdminEnforceApplication();
	createAssistInvest();
	createAvoidApply();
	createAvoidApplyAgree();
	createAvoidApplyReject();
	createCaseProcessIdea();
	createCaseProcessIdeaDetail();
	createDelayPayfineApply();
	createDelayPayfineApplyAgree();
	createDocumentReceipt();
	createDocumentReceiptDetail();
	createEntrustIdentifyDetail();
	createEntrustIdentify();
	createEvidenceList();
	createEvidenceListDetail();
	createEvidenceTreatmentDecision();
	createFillingApprove();
	createHearingBulletin();
	createHearingEntrust();
	createHearingNotes();
	createHearingNotice();
	createHearingReport();
	createIdentifyOpinion();
	createIllegalAction();
	createImportantCaseGroupDiscussion();
	createInquestNotes();
	createInquiryNotes();
	createNondelayPayfineApply();
	createNonpunishmentDecision();
	createOrderCorrect();
	createPunishementDecision();
	createPunishmentFinalReport();
	createSampleEvidence();
	createSampleEvidenceDetail();
	createSceneNotes();
	createSpotPunishmentDecision();
	createStatementExplain();
	createCover();
	createFileList();
	createFileListDetail();
	createFileNote();
	createWithholdCertificate();
	createAdministrativeNotice();
	createSuspensionVehicleDecision();
	createAdministrationEnforceLawFile();
	createRoadCaseFile();
	createVehicleToolsDetainVoucher();
	createVehicleDetainVoucher();
	createFileClanList();
	createFileClanListDetail();
	
}